import React, {useState} from "react";
function AppSubCom(props) {
    const sendFun = props.sendF
    const [msg, setMsg] = useState('123');

    return (
        <>
            <input type="text" value={msg} onChange={(v) => setMsg(v.target.value)} />
            <button onClick={() => sendFun(msg)}>发送</button>
        </>
    )
}

export default AppSubCom